package motionblur;

import java.awt.Canvas;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.event.KeyListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.swing.JFrame;

import motionblur.control.KeyControl;
import motionblur.view.MyFrame;

public class FSTest {
	
	public static void main(String[] args) {
		
		GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
		List<Ball> balls = Collections.synchronizedList(new ArrayList<Ball>());
		KeyListener keyControl = new KeyControl(balls);		
		
		MyFrame frame = new MyFrame(balls);
		frame.setFocusable(true);
		
//		balls.add(new Ball(200, 200, 100, 100));
//		balls.add(new Ball(200, 200, 100, 100));
//		balls.add(new Ball(200, 200, 100, 100));
//		balls.add(new Ball(200, 200, 100, 100));
//		balls.add(new Ball(200, 200, 100, 100));
//		balls.add(new Ball(200, 200, 100, 100));
		
		
		frame.addKeyListener(keyControl);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		frame.goFullScreen(gd);
	}

}
